package com.hoas.quickstart.threads.chapter02.chapter02_2_16_02;

public class Service {

    public void methodA(UserInfo userInfo) {

        synchronized (userInfo) {
            System.out.println(Thread.currentThread().getName());
            userInfo.setUsername("abcabcabc");
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("end! time " + System.currentTimeMillis());
        }

    }

}
